using System;

namespace Atomic.Thermodynamics
{
	/// <summary>
	/// Represents the Gibbs potential, i.e. the potential being minimized at thermal equilibrium when imposing constant temperature and pressure.
	/// </summary>
	public interface IGibbsPotential
	{
		/// <summary>
		/// The free energy (eV) as a function of temperature (K) and pressure (eV/Å^3).
		/// </summary>
		double FreeEnergy(double temperature, double pressure);

		/// <summary>
		/// The volume (Å^3) as a function of temperature (K) and pressure (eV/Å^3, 1 eV/Å^3 = 160.2 GPa).
		/// </summary>
		double Volume(double temperature, double pressure);

		/// <summary>
		/// The volumetric thermal expansion coefficient as a function of temperature (K) and pressure (eV/Å^3). This is defined as the volume multiplied by
		/// its derivative with respect to temperature.
		/// </summary>
		double VolumetricThermalExpansionCoefficient(double temperature, double pressure);

		/// <summary>
		/// Performs a Legendre transform to obtain the Helmholtz potential.
		/// </summary>
		IHelmholtzPotential HelmholtzPotential
		{
			get;
		}
	}
}
